// 运营总览
import React from 'react';
import s from './index.module.scss';
import MapComponent from './map/mapComponent';
import { connect } from 'react-redux';
import { Button } from 'antd';
import store from '../../store'
const Overview = (props) => {
    console.log('props: ', props);
    const initState = store.getState()
    const { storeState, dispatch } = props;
    const changeName = () => {
        dispatch({
            type: 'changeName',
            payload: `李四${new Date().getTime()}`,
        });
    };
    return (
        <div id={s.container}>
            <div className={s.head}>
                运营总览 {initState.name} {storeState.name}
                <Button onClick={changeName}>改变名字</Button>
            </div>
            <div className={s.content}>
                <div className={s.left}>左</div>
                <div className={s.mid}>
                    <div className={s.midHead}>头部</div>
                    <MapComponent></MapComponent>
                </div>
                <div className={s.right}>右</div>
            </div>
        </div>
    );
};
function mapStateToProps(state) {
    return { storeState: state };
}
export default connect(mapStateToProps)(Overview);
